<section id="setuser">
    <section class="userTop">
        <header nz-row>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>车牌号码</span>
                </label>
                <nz-input [(ngModel)]="parts.carNo" [nzPlaceHolder]="'车牌号码'" [nzSize]="'large'"></nz-input>
            </div>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>录入日期</span>
                </label>
                <nz-datepicker style="width:70%;margin-left: 15px" [nzSize]="'large'" [(ngModel)]="createTime" [nzPlaceHolder]="'选择时间'" [nzFormat]="'YYYY-MM-DD'"></nz-datepicker>
            </div>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>车辆类型</span>
                </label>
                <nz-select [(ngModel)]="parts.carCategory" [nzSize]="'large'" [nzPlaceHolder]="'请选择车辆类型'" nzAllowClear>
                    <nz-option *ngFor="let option of optionCarCategory" [nzLabel]="option.text" [nzValue]="option.value">
                    </nz-option>
                </nz-select>
            </div>
            <div nz-col [nzSpan]="6">
                <label>
                    <span>状态</span>
                </label>
                <nz-select [(ngModel)]="parts.carStatus" [nzPlaceHolder]="'车辆状态'" [nzSize]="'large'" nzAllowClear>
                    <nz-option *ngFor="let option of optionCarStatus" [nzLabel]="option.text" [nzValue]="option.value" [nzDisabled]="option.disabled">
                    </nz-option>
                </nz-select>
            </div>
        </header>
        <main class="clearfix" style="margin-top:10px;">
            <button class="fr" nz-button [nzType]="'primary'" (click)="loadAll()">
              <i class="anticon anticon-search"></i><span>检索</span>
            </button>
        </main>
        <footer>
            <button nz-button [nzType]="'default'" routerLink="../car-new">
              <span>添加</span>
            </button>
        </footer>
    </section>
    <section>
        <main>
            <nz-table #nzTable [nzTotal]="_total" [nzAjaxData]="data" [nzPageSize]="10" (nzPageIndexChange)="resetIndex($event)">
                <thead nz-thead>
                    <tr>
                        <th nz-th><span>序号</span></th>
                        <th nz-th><span>车牌号</span></th>
                        <th nz-th><span>录入日期</span></th>
                        <th nz-th><span>车辆类别</span></th>
                        <th nz-th><span>挂车</span></th>
                        <th nz-th><span>物流公司</span></th>
                        <th nz-th><span>状态</span></th>
                        <th nz-th><span>操作</span></th>
                    </tr>
                </thead>
                <tbody nz-tbody>
                    <tr nz-tbody-tr *ngFor="let data of nzTable.data;let i = index">
                        <td nz-td>
                            {{i+1}}
                        </td>
                        <td nz-td>{{data.carNo}}</td>
                        <td nz-td>{{data.createTime}}</td>
                        <td nz-td>{{data.carCategory}}</td>
                        <td nz-td>{{data.isTrailer}}</td>
                        <td nz-td>{{data.carNo}}</td>
                        <td nz-td>{{data.carStatus}}</td>
                        <td nz-td>
                            <button nz-button [nzType]="'default'" [routerLink]="['../carinfo', data.carId ]">
                              <span>查看</span>
                            </button>
                            <button nz-button [nzType]="'default'" [routerLink]="['../car-edit', data.carId ]">
                              <span>修改</span>
                            </button>
                        </td>
                    </tr>
                </tbody>
            </nz-table>
        </main>
    </section>
</section>